﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using DbHelper.Enity;
using System.Reflection;

namespace DbHelper
{
    public class DataAccess
    {
        private static readonly string AssemblyName = "DbHelper";
        private static readonly string db = ConfigurationSettings.AppSettings["DB"];

        public static IUser CreateUser() {
            string className = AssemblyName + ".DbFactory." + db + "User";
            IUser iuser = (IUser)Assembly.Load(AssemblyName).CreateInstance(className);
            return iuser;
        }
    }
}
